package com.probox.common.entity.domain.order;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.probox.common.core.annotation.Excel;

/**
 * 订单父对象 order_info_parent
 *
 * @author hds
 * @date 2021-05-27
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("order_info_parent")
@ApiModel(description="订单父对象")
public class OrderInfoParent implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    //默认主键自增
    @TableId(value = "PARENT_UID", type = IdType.AUTO)
    private Long parentUid;
    /**
     * 支付订单号
     */
    @Excel(name = "支付订单号")
    private String parentOrderNo;
    /**
     * 订单总额
     */
    @Excel(name = "订单总额")
    private Long parentAmount;
    /**
     * 运费金额
     */
    private Long freightAmount;

    /**
     * 优惠券ID
     */
    private Long useCouponUid;

    /**
     * 代金券金额
     */
    private Long useCouponAmount;

    /**
     * 折扣 0.01 代表百分之一折扣
     */
    private Long discountRate;

    /**
     * 折扣金额
     */
    private Long discountAmount;

    /**
     * 余额支付
     */
    private Long payByBalance;

    /**
     * 积分支付
     */
    private Long payByScore;

    /**
     * 红包支付
     */
    private Long payByRedBag;

    /**
     * 支付方式
     */
    private String payMethod;

    /**
     * 支付状态
     */
    private String payStatus;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 支付金额
     */
    @Excel(name = "支付金额")
    private Long payAmount;
    /**
     * 支付时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;
    /**
     *是否需要分账 (Y-是，需要分账;N-否，不分账)
     */
    @Excel(name = "分账")
    private String profitSharing;

    private Date expireDate;

    /**
     * 客户ID
     */
    private Long customerId;

    /**
     * 平台ID/店铺ID
     */
    private Long platformId;

    /**
     * 订单类型(0商品购买/1充值会员/2充值余额)
     */
    private String isRecharge;

    //子订单
    private transient List<OrderInfo> orderInfoList;

    //门店ID
    private Long storeId;

    //订单类型
    private String orderType;
}
